<?php 
namespace app\admin\validate;
use think\Validate;

class Label extends Validate{
	protected $rule = [
	    ['label_name'  ,'require|max:255|unique:label','请输入标签名称|标签名称最多255个字|标签名称已存在'],
	    ['pingying'  ,'require','请输入标签拼音'],
	    ['sort'  ,'require|number','请输入排序|排序只能是数字'],
    ];

    protected $scene = [
        'add'  =>  ['label_name','pingying','sort'],
        'edit'  =>  ['label_name','pingying','sort'],
    ]; 
}